<template>
  <div class="home-card">
    <div class="home-card__header">
      <span class="home-card__header-line" />
      {{ title }}
    </div>
    <div class="home-card__content">
      <slot></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: "home-card",
});

withDefaults(
  defineProps<{
    title?: string;
  }>(),
  {
    title: "标题",
  }
);
</script>

<style lang="less">
.home-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  &__header {
    position: relative;
    font-weight: 500;
    font-size: 36px;
    color: #000000;
    line-height: 50px;
    padding-left: 24px;
    box-sizing: border-box;
    &-line {
      width: 8px;
      height: 34px;
      background: #6acbb9;
      border-radius: 0 6px 6px 0;
      position: absolute;
      transform: translate(0, -50%);
      left: 0;
      top: 50%;
    }
  }
}
</style>
